package com.tuozixuan.spring6.bean;

import java.util.Map;

public class Student {

	private Integer id;

	private String name;

	private Integer age;

	private String sex;
	
	private Clazz clazz;
	
	private String[] hobbies;
	
	private Map<String, Teacher> teacherMap;

	public Student() {
	}
	
	public Student(Integer id, String name, Integer age, String sex) {
		this.id = id;
		this.name = name;
		this.age = age;
		this.sex = sex;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public Clazz getClazz() {
		return clazz;
	}

	public void setClazz(Clazz clazz) {
		this.clazz = clazz;
	}
	
	public String[] getHobbies() {
		return hobbies;
	}

	public void setHobbies(String[] hobbies) {
		this.hobbies = hobbies;
	}
	
	public Map<String, Teacher> getTeacherMap() {
		return teacherMap;
	}

	public void setTeacherMap(Map<String, Teacher> teacherMap) {
		this.teacherMap = teacherMap;
	}

	@Override
	public String toString() {
		String hobbiesStr = "";
		if (hobbies != null) {
			hobbiesStr += "[";
			for (String hobbie : hobbies) {
				hobbiesStr += hobbie + ",";
			}
			hobbiesStr += "]";
		}
		
		return "Student[id:" + id + ", name:" + name + ", age:" + age + ", sex:" + sex + ", clazz:" + clazz + ", hobbies:" + hobbiesStr + ", teacherMap:" + teacherMap + "]";
	}

}
